package com.drg.center.entity.enums;

/**
 * 死亡类型枚举类
 *
 * @Author: zhangxilin
 * @Date: 2021/11/5
 */
public enum DieTypeEnum {

    noDie(1, "未死亡"),

    die(2, "死亡");

    private Integer code;

    private String desc;


    public static DieTypeEnum getByCode(Integer code) {
        for (DieTypeEnum enums : DieTypeEnum.values()) {
            if (enums.getCode().equals(code)) {
                return enums;
            }
        }
        return null;
    }

    DieTypeEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
